-- GENERATED SPELL FOR [Sandfury Shadowcaster] --


function spell0_5648(pUnit, Event) --@Demon Skin,Self--
pUnit:FullCastSpellOnTarget(20798,pUnit)
pUnit:RegisterEvent('Sorts_5648', 0, 1)
end

function spell1_5648(pUnit, Event) --@Dismounting Blast,n/a--
pUnit:FullCastSpellOnTarget(18396,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5648', 261, 1)
end

function spell2_5648(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(12471,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5648', 3000, 1)
end

function spell3_5648(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(14032,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5648', 18000, 1)
end

function Sorts_5648(pUnit, Event)
local choix_sorts_5648 = math.random(0, 3)
if choix_sorts_5648 == 0 then
pUnit:RegisterEvent('spell0_5648', 1, 1)
end
if choix_sorts_5648 == 1 then
pUnit:RegisterEvent('spell1_5648', 1, 1)
end
if choix_sorts_5648 == 2 then
pUnit:RegisterEvent('spell2_5648', 1, 1)
end
if choix_sorts_5648 == 3 then
pUnit:RegisterEvent('spell3_5648', 1, 1)
end
end

function mob5648_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5648', math.random(1500, 3000), 1)
end

function mob5648_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5648_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5648_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5648, 1, 'mob5648_Action')
RegisterUnitEvent(5648, 2, 'mob5648_Leave')
RegisterUnitEvent(5648, 3, 'mob5648_Kill')
RegisterUnitEvent(5648, 4, 'mob5648_Die')
